import { 
  parkIdGetEnterpriseList
 } from '@/api/manage/park'
const park = {
    actions: {
        parkIdGetEnterpriseList({ commit },params) {
            return new Promise((resolve, reject) => {
                parkIdGetEnterpriseList(params).then(res => {
                    if (res.code === '1') {
                        let arr = [];
                    res.data && res.data.forEach(v => {
                        v.value = v.enterpriseId;
                        v.label = v.name;
                        if (v.status === 1) {
                            let params = {};
                            params.value = v.enterpriseId;
                            params.label = v.name;
                            arr.push(params);
                        }
                    })
                    resolve(arr);
                }
                }).catch(error => {
                reject(error)
                })
            })
        },
    }
}
export default park
